#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int a[100001], ans, n, m, xiao = 100000001, da;
inline int read()
{
    int s = 0;
    char ch = getchar();
    while (!isdigit(ch))
        ch = getchar();
    while (isdigit(ch))
    {
        s = (s << 1) + (s << 3) + ch - '0';
        ch = getchar();
    }
    return s;
}
bool pan(int x)
{
    ans = 0;
    for (int i = 1; i <= n; i++)
    {
        if (a[i] >= x)
        {
            ans += a[i] / x;
        }
    }
    if (ans >= m)
        return true;
    else
        return false;
}
int main()
{
    n = read();
    m = read();
    int x;
    for (int i = 1; i <= n; i++)
    {
        x = read();
        da = max(da, x);
        a[i] = x;
    }
    int l = 1, r = da;
    while (l <= r)
    {
        int mid = (l + r) / 2;
        if (pan(mid))
            l = mid + 1;
        else
            r = mid - 1;
    }
    printf("%d", r);
    return 0;
}